package com.xike.micromemberserver.uitl;

import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

/**
 * Auther: wuson  <br/>
 * Date: 2021/3/12:11:09  <br/>
 * Description:
 */
public class DateUtil {
    /**
     * 获得固定数值以后的时间
     * @param date
     * @param time
     * @return
     */
    public static Date getAfterDate(Date date, int time){
        //日历类
        Calendar calendar = new GregorianCalendar();
        //设置当前时间
        calendar.setTime(date);
        //推算time分钟之后的时间
        //Calendar.MINUTE
        //YEAR, MONTH, DATE, HOUR, MINUTE, etc.
        calendar.add(Calendar.MINUTE,time);
        return calendar.getTime();
    }
}
